<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="../core/Cf.js"></script>
<script type="text/javascript" src="../core/function.js"></script>
<script type="text/javascript">
var o = {a: 8}
var fn = function(b, c){
	console.log(this.a, b, c);	
}

var fn2 = function(a){
	console.log(a);
}
/*
fn._bind(o)();
fn._setArg(1, 2)();
fn._appendArg(2)(1);
fn._delay(1000)(1, 2);
fn._repeat(1000)(1, 2);
*/
//fn._bind(o)._delay(1000)(3, 4);

/*fn.create({
	scope: o
	,args: []
	,argsAppend: [2, 3]
	,delay: 1000
	,repeat: 1000
})();*/

function valid(a){
	console.log(this.a);
	return a == 1;
}

var ifn = fn2.createInterceptor(valid, {scope: o});

ifn(2);
ifn(1);

</script>
</head>

<body>
</body>
</html>
